package com.xm.zhEnHelper.dto;

import cn.hutool.core.util.StrUtil;
import lombok.Data;

@Data
public class FieldValue {

    /**
     * 行名称
     */
    private String fieldName;

    /**
     * 行值
     */
    private Object fieldValue;

    /**
     * 行类型
     */
    private String fieldType;

    /**
     * 是否主键
     */
    private boolean isPrimaryKey;

    public boolean isJsonType() {
        return StrUtil.equals(this.fieldType, "json");
    }

    public boolean isTextType() {
        return StrUtil.containsAnyIgnoreCase(this.fieldType, "varchar", "text", "char");
    }
}
